<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="__STATIC__/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
</head>
<body class="gray-bg">
{include file="comm/left"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>提现</h5>
                </div>
                <div class="ibox-content">
                    <form role="form" class="form-horizontal m-t" method="post" action="{:url('index/Salesmandraw/checkadd')}">
                        <div class="form-group draggable">
                            <label class="col-sm-3 control-label">提现金额：</label>
                            <div class="col-sm-9">
                                <input type="number" id="money" name="money" class="form-control" required placeholder="请输入金额">
                            </div>
                        </div>
                        <div class="form-group draggable">
                            <label class="col-sm-3 control-label">提现账号类型：</label>
                            <div class="col-sm-9">
                                <select class="form-control" name="accounttype" required>
                                    <option value="0">支付宝</option>
                                    <option value="1">微信</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group draggable">
                            <label class="col-sm-3 control-label">提现账号：</label>
                            <div class="col-sm-9">
                                <input type="text" id="account" name="account" class="form-control" required placeholder="请输入提现账号">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group draggable">
                            <div class="col-sm-12 col-sm-offset-3">
                                <input type="submit" class="btn btn-primary" value="提现">
                                <button class="btn btn-white" type="back">取消</button>
                            </div>
                        </div>
                    </form>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    window.onload=function(){
        var money=document.getElementById('money');
        var patt1=new RegExp("^[1-9][0-9]*$");
        money.onblur=function(){
            if(patt1.test(money.value)){
                if(money.value>{$yuer}){
                    alert('金额超过余额，请重新输入');
                    money.value="";
                }
            }else{
                alert('金额必须为大于零的整数');
                money.value="";
            }
        }
    }
</script>